[doc] Use cmake -B args instead of cd into build dir#19392
[doc] Use cmake -B args instead of cd into build dir#19392XAheli wants to merge 2 commits intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19392
Note: Links to docs will display an error until the docs builds have been completed.
|
This PR needs a
|
There was a problem hiding this comment.
Pull request overview
This PR updates ExecuTorch documentation to use CMake’s -B (binary dir) and presets workflow consistently, avoiding “cd into build dir” patterns and fixing a few small doc issues/typos. This aligns the docs with the CMakePresets-based build flow used in the repo.
Changes:
- Replace
cmake ../ directory-changing examples withcmake -B cmake-out ...where applicable. - Document and use
cmake --preset ...correctly (including adding the existingwindowspreset to the documented list). - Fix minor doc issues: typos, a broken
cmake -bflag, and remove an orphaned text fragment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/source/using-executorch-building-from-source.md | Modernizes build instructions to use -B / presets, adds windows preset mention, and fixes typos/stray text. |
| docs/source/kernel-library-selective-build.md | Updates selective build example to use cmake -B cmake-out rather than cmake ... |
| docs/source/using-executorch-runtime-integration.md | Fixes invalid cmake -b to cmake -B in the logging configuration example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @GregoryComer while working on this I noticed a few more places across the docs that still use the old
Wanted to flag these and happy to tackle them in a follow up if you think it makes sense. Let me know :) |
GregoryComer
left a comment
There was a problem hiding this comment.
Thanks! Left one comment, but otherwise looks great.
| ```bash | ||
| # Configure the build with the ios preset. | ||
| cmake .. --preset ios | ||
| cmake --preset ios |
There was a problem hiding this comment.
Can you add -B cmake-out here?
5068c2b to
4c2cfa6
Compare
Addresses the remaining item from #14759
Files changed
docs/source/using-executorch-building-from-source.mdcmake ..invocations withcmake -B cmake-out(run from repo root, no cd needed)cmake --preset ios(presets define binaryDir via CMakePresets.json)mkdir cmake-outbeforecmake -B(cmake creates it automatically)windowspreset to documented presets list (exists in CMakePresets.json)Bulild→Build,Addition→Additional, ccache refabove→belowdocs/source/kernel-library-selective-build.mdcmake ..withcmake -B cmake-outin selective build exampledocs/source/using-executorch-runtime-integration.mdcmake -b(lowercase, invalid CMake syntax) →cmake -BTest plan
lintrunnerpasses on all 3 changed filescmake ..patternscc @GregoryComer @mergennachin